package com.ruoyi.graduate.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * <p>
 * 轮播图表实体类（关联《毕设.doc》系统管理-轮播图管理）
 * </p>
 *
 * @author [开发者名称]
 * @since 2025-10-31
 */
@Data
@ApiModel("轮播图表")
@TableName("ms_carousel")
public class MsCarousel {

    @ApiModelProperty(value = "轮播图唯一标识（自增主键）")
    @TableId(type = IdType.AUTO)// 对应数据库AUTO_INCREMENT自增主键
//    @TableField(value = "id")
    private Integer carouselId;

    @ApiModelProperty(value = "轮播图路径（必填字段，《毕设.doc》核心字段）")
    private String image;

    @ApiModelProperty(value = "轮播图标题（必填字段，《毕设.doc》核心字段）")
    private String name;

//    @ApiModelProperty(value = "排序号（数字越小越靠前，默认0，《毕设.doc》排序字段）")
//    private Integer sortNo;

    @ApiModelProperty(value = "是否启用（0=禁用，1=启用，默认1，《毕设.doc》状态字段）")
    private Integer isEnabled;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建者")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "更新者")
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "删除标志（0代表存在 2代表删除）")
    @TableLogic
    private String delFlag;

}